package org.jeecg.modules.car.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.entity.basedata.BaseFloor;
import org.jeecg.entity.basedata.BaseRoom;
import org.jeecg.entity.car.CarInfo;
import org.jeecg.modules.car.mapper.CarInfoMapper;
import org.jeecg.modules.car.service.ICarInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 月卡车列表
 * @Author: jeecg-boot
 * @Date:   2019-07-10
 * @Version: V1.0
 */
@Service
public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> implements ICarInfoService {

    @Autowired
    private CarInfoMapper carInfoMapper;

    @Override
    public List<CarInfo> findPage(Page<CarInfo> page, CarInfo carInfo) {

        return carInfoMapper.findPage(page,carInfo);
    }

    @Override
    public void updateCheckStatus(CarInfo carInfo) {
        carInfoMapper.updateCheckStatus(carInfo);
    }

    @Override
    public CarInfo selectByCarPortId(String carPortId){
        return carInfoMapper.selectByCarPortIdCarNum(carPortId);
    }

    @Override
    public BaseRoom getRoomByRoomNameCusName(String floorId, String roomName, String cusName){
        return carInfoMapper.getRoomByRoomNameCusName(floorId,roomName,cusName);
    }

    @Override
    public BaseRoom getRoomByRoomNameTent(String floorId,String roomName,String tentName){
        return carInfoMapper.getRoomByRoomNameTent(floorId,roomName,tentName);
    }

    @Override
    public BaseRoom getRoomByProjectFloorRoomName(BaseRoom baseRoom){
        return carInfoMapper.getRoomByProjectFloorRoomName(baseRoom);
    }

    @Override
    public BaseFloor getFloorByName(String floorName , String projectId){
        return carInfoMapper.getFloorByName(floorName,projectId);
    }

    @Override
    public void updateFeeDate(CarInfo carInfo) {
        carInfoMapper.updateFeeDate(carInfo);
    }

    @Override
    public CarInfo getByCarNo(String plateNumber, String parkId) {
        return carInfoMapper.getByCarNo(plateNumber, parkId);
    }

    @Override
    public CarInfo getByCarId(String id) {
        return carInfoMapper.getByCarId(id);
    }

    @Override
    public List<CarInfo> findByIds(List<String> carIdList) {
        return carInfoMapper.findByIds(carIdList);
    }

    @Override
    public List<CarInfo> findByIds() {
        return carInfoMapper.findByIds1();
    }

    @Override
    public void updateSyncStatus(String id) {
        carInfoMapper.updateSyncStatus(id);
    }

    @Override
    public Integer getCountByRuleId(String ruleId) {
        return carInfoMapper.getCountByRuleId(ruleId);
    }

    @Override
    public List<CarInfo> getByCarPortId(String carPortId) {
        return carInfoMapper.getByCarPortId(carPortId);
    }

    @Override
    public List<CarInfo> getAllOrderCarList(String templateType) {
        return carInfoMapper.getAllOrderCarList(templateType);
    }

    @Override
    public List<CarInfo> getMonthCarNo(String parkId, String tenantId, List<String> carNoIds){
        return carInfoMapper.getMonthCarNo(parkId,tenantId,carNoIds);
    }

    @Override
    public void updateIsExist(String id,String tenantId, Integer isExit) {
        carInfoMapper.updateIsExist(id,tenantId,isExit);
    }

    @Override
    public List<CarInfo> findByParkId(String parkId) {
        return carInfoMapper.findByParkId(parkId);
    }

}
